Imports Microsoft.VisualBasic

Public MustInherit Class BizObject
    Protected Shared ReadOnly Property Cache() As Cache
        Get
            Return HttpContext.Current.Cache
        End Get
    End Property
    Public Shared ReadOnly Property CurrentUserName() As String
        Get
            Dim UserName As String = ""
            If HttpContext.Current.User.Identity.IsAuthenticated Then
                UserName = HttpContext.Current.User.Identity.Name
            End If
            Return UserName
        End Get
    End Property
    Public Shared Function FixNull(ByVal input As String) As String
        If IsNothing(input) Then Return "" Else Return input
    End Function
    Public Shared ReadOnly Property CurrentIP() As String
        Get
            Return HttpContext.Current.Request.UserHostAddress
        End Get
    End Property
End Class
